#include <iostream>
#include <memory>
#include "tcpserver.hpp"

void Usage(std::string proc)
{
    std::cout << "usage:" << proc  << "port" << std::endl;
}

int main(int argv,char*argc[])
{
    if(argv!=2)
    {
        Usage(argc[0]);
        return 0;
    }
    std::unique_ptr<tcpserver>tc=std::make_unique<tcpserver>(std::stoi(argc[1]));
    tc->init();
    tc->start();
    return 0;
}